// pages/main/Main.js

 const utils= require('../../utils/util')
 
Page({

  /**
   * Page initial data
   */
  data: {
       tab_position:0,
  },

  /**
   * Lifecycle function--Called when page load
   */
  onLoad(options) {
      // console.log("首页数据A->"+utils.finance_permission.length)
      // console.log("首页数据B->"+utils.transfer_permission.length)
      // console.log("首页数据C->"+utils.findshop_permission.length)
  }, 

  changeTab(e){
    const query= e.currentTarget.dataset.query;
   // console.log("tab click"+query)
     this.setData({
        tab_position:query
     })
  },

  onSwiperChange(e){
     let position=e.detail.current
     this.setData({
      tab_position:position
   })
  },

  /**
   * Lifecycle function--Called when page is initially rendered
   */
  onReady() {

  },

  /**
   * Lifecycle function--Called when page show
   */
  onShow() {

  },

  /**
   * Lifecycle function--Called when page hide
   */
  onHide() {

  },

  /**
   * Lifecycle function--Called when page unload
   */
  onUnload() {

  },

  /**
   * Page event handler function--Called when user drop down
   */
  onPullDownRefresh() {

  },

  /**
   * Called when page reach bottom
   */
  onReachBottom() {

  },

  /**
   * Called when user click on the top right corner to share
   */
  onShareAppMessage() {

  }
})